import {getComments} from '../../api/details'
Component({
  options:{
    styleIsolation:"shared"
  },
  data: {
    longList: {}
  },
  properties: {
    pl:Array,
    gb:Boolean
  },
  methods: {
    async sethuifu(e){
      if(!this.data.gb) return
      this.triggerEvent('update-count',true)
      console.log(e.currentTarget.dataset.count,e.currentTarget.dataset.id);
      this.setData({
        pl:[e.currentTarget.dataset.id]
      })
      const {data} = await getComments({
        type:'c',
        source: e.currentTarget.dataset.count,
        limit: 50
      })
      console.log(data);
      this.setData({
        longList:data
      })
      this.triggerEvent('update-data',data)
      this.triggerEvent('update-id',e.currentTarget.dataset.count)
    }
  }
})